package com.allen.imsystem.message.model.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class BaseMsgRecord implements Serializable, Cloneable {

    @ApiModelProperty(value = "消息全局唯一序列号")
    @TableId(value = "msg_id", type = IdType.NONE)
    protected Long msgId;

    @ApiModelProperty(value = "消息类型 1->文本，2->图片，3->文件")
    protected Integer msgType;

    @ApiModelProperty(value = "消息内容，文件消息显示为文件名， 图片消息为 [图片]")
    protected String content;

    @ApiModelProperty(value = "上传的文件/图片的md5")
    protected String fileMd5;

    @ApiModelProperty(value = "1->有效，0->无效")
    protected Boolean status;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    protected Date createdTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    protected Date updateTime;
}
